package com.lcj.bff.driver.service.impl;

import com.lcj.bff.driver.controller.form.CanPayForm;
import com.lcj.bff.driver.controller.form.PayFineForm;
import com.lcj.bff.driver.controller.form.SearchFineForm;
import com.lcj.bff.driver.feign.DriverServiceApi;
import com.lcj.bff.driver.service.FineService;
import com.lcj.common.util.Result;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

@Service
public class FineServiceImpl implements FineService {

    @Resource
    private DriverServiceApi driverServiceApi;

    /**
     * 分页查询司机罚款
     * @param form
     * @return HashMap
     */
    @Override
    public Result searchFineByPage(SearchFineForm form) {
        Result res = driverServiceApi.searchFineByPage(form);
        return res;
    }

    /**
     * 判断能否支付
     * @param form
     * @return
     */
    @Override
    public Result canPay(CanPayForm form) {
        Result result = driverServiceApi.canPay(form);
        return result;
    }

    /**
     * 支付罚款
     * @param form
     * @return
     */
    @Override
    public Result payFine(PayFineForm form) {
        Result result = driverServiceApi.payFine(form);
        return result;
    }
}
